﻿if exists (select * from dbo.sysobjects where id = object_id(N'[dbo].[RemindersQueueInsert]') and OBJECTPROPERTY(id, N'IsProcedure') = 1)
drop procedure [dbo].RemindersQueueInsert
GO
                    
CREATE PROCEDURE dbo.RemindersQueueInsert
(
	@RemindersQueueName nvarchar(200),
	@SiteCollectionID uniqueidentifier,
	@SiteCollectionJobIdentifier uniqueidentifier,
	@Created datetime,
	@Modified datetime,
	@RemindersQueueID int OUTPUT
)
AS

SET NOCOUNT ON

INSERT INTO dbo.RemindersQueue
(
	RemindersQueueName,
	SiteCollectionID,
	SiteCollectionJobIdentifier,
	Created,
	Modified
)
VALUES
(
	@RemindersQueueName,
	@SiteCollectionID,
	@SiteCollectionJobIdentifier,
	@Created,
	@Modified
)

SET @RemindersQueueID = SCOPE_IDENTITY()
GO  